<template>
  <Back/>
  <h2 v-html="this.msgList.title"></h2>
  <div v-html="this.msgList.content" style="color: black; font-size: 0.8em"></div>
</template>

<script>
import {getMessageById} from "../../apis/api.js";
import Back from "../../components/BackNavbar.vue";
export default {
  components:{
    Back
  },
  data() {
    return {
      msgList: [],
    }
  },
  mounted() {
    this.messageAll();
  },
  methods: {
    messageAll() {
        getMessageById(this.$route.params.id).then(res => {
          this.msgList = res.data.data;
        });
    }
  }
}
</script>

<style>
h2 {
  text-align: center;
  font-size: 1.1em;
}
</style>